﻿using System.Diagnostics;

namespace Bing
{
    /// <summary>
    /// Contains properties related to an image returned for a request to the InstantAnswer <see cref="ApiHelper.SourceType"/>. 
    /// </summary>
    [DebuggerDisplay("{ContentType}: {Title}={InstantAnswerSpecificData}")]
    public class InstantAnswerResult
    {
        /// <summary>
        /// Gets or sets the name of the specific Instant Answer resource that sends the result.
        /// </summary>
        /// <value>The name of the specific Instant Answer resource that sends the result.</value>
        public string ContentType { get; set; }

        /// <summary>
        /// Gets or sets the title of the result.
        /// </summary>
        /// <value>The title of the result.</value>
        /// <remarks>Typically this is the input query (for example, 789*12).</remarks>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the URL of the specific InstantAnswer resource that provides a result.
        /// </summary>
        /// <value>The URL of the specific InstantAnswer resource that provides a result.</value>
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets the URL of the Bing page that contains the answer.
        /// </summary>
        /// <value>The URL of the Bing page that contains the answer.</value>
        public string ClickThroughUrl { get; set; }

        /// <summary>
        /// Gets or sets Returns results depending on the query and the <c>ContentType</c>.
        /// </summary>
        /// <value>Returns results depending on the query and the <see cref="ContentType"/>.</value>
        public string Attribution { get; set; }

        /// <summary>
        /// Gets or sets results depending on the query and the <see cref="ContentType"/>.
        /// </summary>
        /// <value>Returns results depending on the query and the <see cref="ContentType"/>.</value>
        /// <remarks>
        /// <p>Table 1 shows data specific to <see cref="ContentType"/>s associated with <strong>Encarta</strong>:</p>
        /// <h3 class="subHeading"></h3>
        /// <table>
        ///   <tbody><tr>
        ///     <th colspan="1">
        ///       <strong><see cref="ContentType"/></strong>
        ///     </th>
        ///     <th colspan="1">
        ///       <strong>Example Query</strong>
        ///     </th>
        ///     <th colspan="1">
        ///       <strong>IASpecificData</strong>
        ///     </th>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Encarta.Calculator</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>789*12</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>
        ///         <strong>EncartaResultValue</strong> (result of calculation)</p>
        ///       <p>For more information see &lt;insert code sample ref&gt;</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Encarta.Equation</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>19x=63</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>
        ///         <strong>EncartaResultValue</strong> (result of equation)</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Encarta.Conversion</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Seconds in a year</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>
        ///         <strong>EncartaResultValue</strong> (result of conversion)</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Encarta.Definition</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Define salient</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>
        ///         <strong>SimpleDisplayText</strong> (definition)</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Encarta.Facts</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Population of Mali</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>
        ///         <strong>EncartaResultIndicator</strong> (for example, <strong>Population, Total</strong>)</p>
        ///       <p>
        ///         <strong>EncartaResultYear</strong> (for example, <strong>2008 estimate</strong>)</p>
        ///       <p>
        ///         <strong>EncartaResultValue</strong> (fact itself)</p>
        ///     </td>
        ///   </tr>
        /// </tbody></table>
        /// <p>Table 2 shows data specific to the <see cref="FlightStatus"/> <see cref="ContentType"/>.</p>
        /// <h3 class="subHeading"></h3>
        /// <table>
        ///   <tbody><tr>
        ///     <th colspan="1">
        ///       <strong>IASpecificData</strong>
        ///     </th>
        ///     <th colspan="1">
        ///       <strong>Description</strong>
        ///     </th>
        ///     <th colspan="1">
        ///       <strong>Example</strong>
        ///     </th>
        ///     <th colspan="1">
        ///       <strong>Type</strong>
        ///     </th>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>AirlineCode</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2-letter code for an airline</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UA, for United Airlines</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>AirlineName</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Airline name</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>United</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>FlightNumber</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Number of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>820</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>FlightName</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Full identifier of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UA820</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>FlightHistoryId</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Unique identifier for a specific instance of a flight </p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>15523234</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>StatusString</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Status of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>En route</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>StatusCode</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2-digit code that indicates the status of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>76</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>OnTimeString</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Progress of a flight with respect to schedule</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>delayed</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>ScheduledDeparture</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Scheduled date and time of departure for a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2009-05-12T13:40:00Z</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Updated Departure</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Updated date and time of departure for a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2009-05-12T13:40:00Z</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>ScheduledArrival</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Scheduled date and time of arrival for a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2009-05-12T15:45:00Z</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>UpdatedArrival</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Scheduled date and time of arrival for a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2009-05-12T16:01:00Z</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>UnsignedInt</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Origin Airport/Code</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where a flight originates</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>SFO</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Origin Airport/Name</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Name of airport where flight originates</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>San Francisco</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Origin Airport/TimezoneOffset</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Offset, in seconds, from Universal Time Coordinates (UTC), of originating airport time zone</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>25200</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Int</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Destination Airport/Code</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where a flight ends</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>SEA</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Destination Airport/Name</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Name of airport where a flight ends</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Seattle</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>Destination Airport/TimezoneOffset</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Offset, in seconds, from Universal Time Coordinates (UTC), of destination airport time zone</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>25200</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Int</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>DepartureGate</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Departure gate</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>73</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>DepartureTerminal</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Departure terminal</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>3</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>ArrivalGate</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Arrival gate</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>N14</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>ArrivalTerminal</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Arrival terminal</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>1</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>PreviousSegment/ FlightHistoryId</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Unique identifier for the previous segment of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>159648533</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Uint32</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>PreviousSegment/ OriginAirport</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where the previous segment of a multi-segment flight originated</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>ANC</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>PreviousSegment/ DestinationAirport</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where the previous segment of a multi-segment flight ended</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>SFO</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>String</p>
        ///     </td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>NextSegment/ FlightHistoryId</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Unique identifier for the next segment of a flight</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>158351972</p>
        ///     </td>
        ///     <td colspan="1"></td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>NextSegment/ OriginAirport</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where the next segment of a multi-segment flight originates</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>SEA</p>
        ///     </td>
        ///     <td colspan="1"></td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>NextSegment/ DestinationAirport</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Code for airport where the next segment of a multi-segment flight ends</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>ANC</p>
        ///     </td>
        ///     <td colspan="1"></td>
        ///   </tr>
        ///   <tr>
        ///     <td colspan="1">
        ///       <p>DataFreshness</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>Number of minutes since this data was refreshed</p>
        ///     </td>
        ///     <td colspan="1">
        ///       <p>2</p>
        ///     </td>
        ///     <td colspan="1"></td>
        ///   </tr>
        /// </tbody></table>
        /// </remarks>
        public string InstantAnswerSpecificData { get; set; }

        /// <summary>
        /// Gets or sets the encarta.
        /// </summary>
        /// <value>The encarta.</value>
        public Encarta Encarta { get; set; }

        /// <summary>
        /// Gets or sets the flight status.
        /// </summary>
        /// <value>The flight status.</value>
        public FlightStatus FlightStatus { get; set; }

    }
}
